;
var live800 = function(){
	var num = 0;/*关闭KST次数*/
	/*public function*/
	/*show_divM*/
	var openM = function(time){
		setTimeout(function(){
			divM.fadeIn(1000);
			suoxiao(false);
		},time);
	};
	/*suoxiao*/
	var suoxiao = function(bool){
		bool ? $("#divM_suoxiao").fadeIn() : $("#divM_suoxiao").fadeOut();
	};
	/*rand_num*/
	var GetRandomNum = function(Min, Max) {
		var Range = Max - Min;
		var Rand = Math.random();
		return (Min + Math.round(Rand * Range));
	};
	/*init*/
	var init = {
		ChatForm : function(){
			$("head").append("<link rel='stylesheet' href='/skin/css/swt.css?321'/>");
			document.writeln('<div id="divM">');
			document.writeln('<span class="activity" onClick="onKST();return false;" ></span>');
			document.writeln('<span id="divMagb"  target="_self" title="关闭">X</span>');
			document.writeln('</div>');
			document.writeln('<div id="divM_suoxiao">');
			document.writeln('<span id="divM_suoxiao_a" onClick="onKST();return false;" target="_self" title="点我咨询"></span>');
			document.writeln('<span id="divM_suoxiao_b" target="_self" title="关闭"></span>');
			document.writeln('</div>');
			/*float-right*/
			document.writeln('<div id="divR">');
			document.writeln('<span title="在线咨询" target="_self" onClick="onKST();return false;" class="divRzx"><i id="divRsjs"></i></span>');
			document.writeln('<span title="地址" class="divRaddre" target="_blank"><a href="https://j.map.baidu.com/84/30K" target="_blank" style="display: inline-block;width: 100%;height: 100%;"></a></span>');
			document.writeln('<span class="backto_top" title="返回顶部" target="_self"></span>');
			document.writeln('</div>');
			$('#divRsjs').html(GetRandomNum(40,70));
			window.divM = $('#divM');
		},
		Show : function(){
			openM(6000);/*初次弹出时间*/
		},
		Click : function(){
			/*hide-divM*/
			$('#divMagb').click(function(){
				if(!divM.sty){
					divM.sty = {
						width : divM.css('width'),
						height : divM.css('height'),
						right : '50%',
						bottom : '50%',
						marginRight : divM.css('marginRight'),
						marginBottom : divM.css('marginBottom')
					};
				}
				divM.animate({'width': '0', 'height': '0', 'right': '0', 'bottom': '0', 'margin-right': '0', 'margin-bottom': '0'},1000,
				function(){
					divM.hide().css(divM.sty);
					suoxiao(true);
					num++;
				});
			});
			/*hide-suoxiao*/
			$('#divM_suoxiao_b').click(function(){
				suoxiao(false);
			});
			/*top*/
			$('.backto_top').click(function(){
				$('html').animate({ scrollTop: 0 });
			});
		}
	};
	/*run_fun*/
	var run = function (obj){
		for (var f in obj) {
			obj[f]();
		}
	};
	return run(init);
}();